3.1.9 \(\int \frac {1}{1-2 \coth ^2(x)} \, dx\) [9]

Optimal. Leaf size=19 \[ -x+\sqrt {2} \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right ) \]

[Out]

-x+arctanh(1/2*2^(1/2)*tanh(x))*2^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3741, 3756, 212} \begin {gather*} \sqrt {2} \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right )-x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 - 2*Coth[x]^2)^(-1),x]

[Out]

-x + Sqrt[2]*ArcTanh[Tanh[x]/Sqrt[2]]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3741

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> Simp[x/(a - b), x] - Dist[b/(a - b), Int[Sec[e
 + f*x]^2/(a + b*Tan[e + f*x]^2), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a, b]

Rule 3756

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rubi steps

\begin {align*} \int \frac {1}{1-2 \coth ^2(x)} \, dx &=-x-2 \int \frac {\text {csch}^2(x)}{1-2 \coth ^2(x)} \, dx\\ &=-x+2 \text {Subst}\left (\int \frac {1}{1-2 x^2} \, dx,x,\coth (x)\right )\\ &=-x+\sqrt {2} \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 19, normalized size = 1.00 \begin {gather*} -x+\sqrt {2} \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 - 2*Coth[x]^2)^(-1),x]

[Out]

-x + Sqrt[2]*ArcTanh[Tanh[x]/Sqrt[2]]

________________________________________________________________________________________

Maple [A]
time = 0.42, size = 27, normalized size = 1.42

method result size
derivativedivides \(\sqrt {2}\, \arctanh \left (\coth \left (x \right ) \sqrt {2}\right )+\frac {\ln \left (\coth \left (x \right )-1\right )}{2}-\frac {\ln \left (1+\coth \left (x \right )\right )}{2}\) \(27\)
default \(\sqrt {2}\, \arctanh \left (\coth \left (x \right ) \sqrt {2}\right )+\frac {\ln \left (\coth \left (x \right )-1\right )}{2}-\frac {\ln \left (1+\coth \left (x \right )\right )}{2}\) \(27\)
risch \(-x +\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 x}+3-2 \sqrt {2}\right )}{2}-\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 x}+3+2 \sqrt {2}\right )}{2}\) \(39\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1-2*coth(x)^2),x,method=_RETURNVERBOSE)

[Out]

2^(1/2)*arctanh(coth(x)*2^(1/2))+1/2*ln(coth(x)-1)-1/2*ln(1+coth(x))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 38 vs. \(2 (16) = 32\).
time = 0.49, size = 38, normalized size = 2.00 \begin {gather*} -\frac {1}{2} \, \sqrt {2} \log \left (-\frac {2 \, \sqrt {2} - e^{\left (-2 \, x\right )} - 3}{2 \, \sqrt {2} + e^{\left (-2 \, x\right )} + 3}\right ) - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-2*coth(x)^2),x, algorithm="maxima")

[Out]

-1/2*sqrt(2)*log(-(2*sqrt(2) - e^(-2*x) - 3)/(2*sqrt(2) + e^(-2*x) + 3)) - x

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 70 vs. \(2 (16) = 32\).
time = 0.39, size = 70, normalized size = 3.68 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (-\frac {3 \, {\left (2 \, \sqrt {2} - 3\right )} \cosh \left (x\right )^{2} - 4 \, {\left (3 \, \sqrt {2} - 4\right )} \cosh \left (x\right ) \sinh \left (x\right ) + 3 \, {\left (2 \, \sqrt {2} - 3\right )} \sinh \left (x\right )^{2} + 2 \, \sqrt {2} - 3}{\cosh \left (x\right )^{2} + \sinh \left (x\right )^{2} + 3}\right ) - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-2*coth(x)^2),x, algorithm="fricas")

[Out]

1/2*sqrt(2)*log(-(3*(2*sqrt(2) - 3)*cosh(x)^2 - 4*(3*sqrt(2) - 4)*cosh(x)*sinh(x) + 3*(2*sqrt(2) - 3)*sinh(x)^
2 + 2*sqrt(2) - 3)/(cosh(x)^2 + sinh(x)^2 + 3)) - x

________________________________________________________________________________________

Sympy [A]
time = 0.30, size = 34, normalized size = 1.79 \begin {gather*} - x - \frac {\sqrt {2} \log {\left (\tanh {\left (x \right )} - \sqrt {2} \right )}}{2} + \frac {\sqrt {2} \log {\left (\tanh {\left (x \right )} + \sqrt {2} \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-2*coth(x)**2),x)

[Out]

-x - sqrt(2)*log(tanh(x) - sqrt(2))/2 + sqrt(2)*log(tanh(x) + sqrt(2))/2

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 38 vs. \(2 (16) = 32\).
time = 0.38, size = 38, normalized size = 2.00 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (-\frac {2 \, \sqrt {2} - e^{\left (2 \, x\right )} - 3}{2 \, \sqrt {2} + e^{\left (2 \, x\right )} + 3}\right ) - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-2*coth(x)^2),x, algorithm="giac")

[Out]

1/2*sqrt(2)*log(-(2*sqrt(2) - e^(2*x) - 3)/(2*sqrt(2) + e^(2*x) + 3)) - x

________________________________________________________________________________________

Mupad [B]
time = 0.11, size = 15, normalized size = 0.79 \begin {gather*} \sqrt {2}\,\mathrm {atanh}\left (\sqrt {2}\,\mathrm {coth}\left (x\right )\right )-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/(2*coth(x)^2 - 1),x)

[Out]

2^(1/2)*atanh(2^(1/2)*coth(x)) - x

________________________________________________________________________________________